# -*- coding: utf-8 -*-
"""
Created on Sat Aug  7 20:29:39 2021

@author: chibi
"""

import serial,time

temp = 'temp.txt'

with open (temp,'r') as f :
    lines  = f.readlines()
    a = []
    
    for line in lines:
        line = line.strip()
        a.append(line)
        
print(a)
with serial.Serial() as ser:
    ser.baudrate = 115200
    ser.port = 'COM7'
    ser.timeout = 5
    ser.open()
    
    time.sleep(5)
    
    for j in range (9):
        for x in a:
            temp = x.encode("utf-8")
            ser.write(temp)
            time.sleep(0.01)
            
        time.sleep(0.01)



        